woocommerce product_cat apply to custom post type

91

add_action( 'init', 'add_product_cat_to_custom_post_type' );
function add_product_cat_to_custom_post_type() {
    register_taxonomy_for_object_type( 'product_cat', 'custom_post_type' );
}

Comments

Submit
0 Comments